<script setup>
import { defineProps } from "vue";
import { useRouter } from "vue-router";
const router = useRouter();
const emit = defineEmits(["backbtn"]);
defineProps({
  // 名称
  title: {
    type: String,
    required: true,
    default: "",
  },
  leftText: {
    type: String,
    default: "返回",
  },
  leftArrow: {
    type: Boolean,
    default: true,
  },
});
const onClickLeft = () => {
  emit("backbtn");
};
</script>
<template>
  <div>
    <van-nav-bar
      :title="title"
      :left-text="leftText"
      :left-arrow="leftArrow"
      @click-left="onClickLeft"
    />
  </div>
</template>
<style lang="scss" scoped></style>
